From 2962480b2c662ffb744dc28c3710305e3219dca9 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Wed, 21 Dec 2005 21:05:22 +0000 Subject: [PATCH] Update class_n_properties after installing color-hash, since other classes 2005-12-21 Matthias Clasen * gtk/gtksettings.c (gtk_settings_class_init): Update class_n_properties after installing color-hash, since other classes install settings, too. * gtk/gtkctree.c: * gtk/gtkclist.c: Fix some mistakes in the conversion from mem chunks to slice allocator. --- ChangeLog | 8 ++++++++ ChangeLog.pre-2-10 | 8 ++++++++ gtk/gtkclist.c | 4 ++-- gtk/gtkctree.c | 4 ++-- gtk/gtksettings.c | 5 ++++- 5 files changed, 24 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5f3f4bc9ac..3b8879bfd3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,13 @@ 2005-12-21 Matthias Clasen + * gtk/gtksettings.c (gtk_settings_class_init): Update + class_n_properties after installing color-hash, since + other classes install settings, too. + + * gtk/gtkctree.c: + * gtk/gtkclist.c: Fix some mistakes in the conversion + from mem chunks to slice allocator. + * gtk/gtkiconview.c (adjust_wrap_width): Adjust the wrap-width also if an explicit item width is set. (#322475, Alex Graveley) diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index 5f3f4bc9ac..3b8879bfd3 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,5 +1,13 @@ 2005-12-21 Matthias Clasen + * gtk/gtksettings.c (gtk_settings_class_init): Update + class_n_properties after installing color-hash, since + other classes install settings, too. + + * gtk/gtkctree.c: + * gtk/gtkclist.c: Fix some mistakes in the conversion + from mem chunks to slice allocator. + * gtk/gtkiconview.c (adjust_wrap_width): Adjust the wrap-width also if an explicit item width is set. (#322475, Alex Graveley) diff --git a/gtk/gtkclist.c b/gtk/gtkclist.c index 71f2ddbfea..22129cd3b7 100644 --- a/gtk/gtkclist.c +++ b/gtk/gtkclist.c @@ -6349,7 +6349,7 @@ row_new (GtkCList *clist) GtkCListRow *clist_row; clist_row = g_slice_new (GtkCListRow); - clist_row->cell = g_slice_new (GtkCell); + clist_row->cell = g_slice_alloc (sizeof (GtkCell) * clist->columns); for (i = 0; i < clist->columns; i++) { @@ -6398,7 +6398,7 @@ row_delete (GtkCList *clist, if (clist_row->destroy) clist_row->destroy (clist_row->data); - g_slice_free (GtkCell, clist_row->cell); + g_slice_free1 (sizeof (GtkCell) * clist->columns, clist_row->cell); g_slice_free (GtkCListRow, clist_row); } diff --git a/gtk/gtkctree.c b/gtk/gtkctree.c index 86845d7d77..226e484ef9 100644 --- a/gtk/gtkctree.c +++ b/gtk/gtkctree.c @@ -3196,7 +3196,7 @@ row_new (GtkCTree *ctree) clist = GTK_CLIST (ctree); ctree_row = g_slice_new (GtkCTreeRow); - ctree_row->row.cell = g_slice_new (GtkCell); + ctree_row->row.cell = g_slice_alloc (sizeof (GtkCell) * clist->columns); for (i = 0; i < clist->columns; i++) { @@ -3282,7 +3282,7 @@ row_delete (GtkCTree *ctree, dnotify (ddata); } - g_slice_free (GtkCell, ctree_row->row.cell); + g_slice_free1 (sizeof (GtkCell) * clist->columns, ctree_row->row.cell); g_slice_free (GtkCListRow, ctree_row); } diff --git a/gtk/gtksettings.c b/gtk/gtksettings.c index 1199c452e3..a0a10ef75a 100644 --- a/gtk/gtksettings.c +++ b/gtk/gtksettings.c @@ -211,7 +211,6 @@ gtk_settings_class_init (GtkSettingsClass *class) gobject_class->notify = gtk_settings_notify; quark_property_parser = g_quark_from_static_string ("gtk-rc-property-parser"); - result = settings_install_property_parser (class, g_param_spec_int ("gtk-double-click-time", P_("Double Click Time"), @@ -481,6 +480,7 @@ gtk_settings_class_init (GtkSettingsClass *class) g_assert (result == PROP_ENABLE_ANIMATIONS); + /** * GtkSettings:color-hash: * @@ -496,6 +496,9 @@ gtk_settings_class_init (GtkSettingsClass *class) P_("A hash table resentation of the color scheme."), G_TYPE_HASH_TABLE, GTK_PARAM_READABLE)); + + class_n_properties++; + } static void -- 2.30.2